/** 
 * Description:
 * Date:2012-6-20
 * Author:Along	
*/
package com.community.shopping.util;
import javax.mail.Authenticator;   
import javax.mail.PasswordAuthentication;   
 
/**  
 * 用户名和密码的验证  
 * @author hualong_wu  
 *  
 */  
public class MailAuthenticator extends Authenticator{   
    private  String username="xxxxx";      
    private  String password="xxxxx";      
       
    public MailAuthenticator() {   
        super();   
    }   
       
    /**  
     * 设置验证的用户名和密码  
     */  
    public MailAuthenticator(String userName , String password) {   
        super();   
        this.username = userName;   
        this.password = password;   
    }   
    protected PasswordAuthentication getPasswordAuthentication()   
    {      
        return new PasswordAuthentication(this.username,this.password);      
    }      
}  

